package com.atguigu.gmall.product.controller;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.product.eneity.BaseSaleAttr;
import com.atguigu.gmall.product.service.BaseSaleAttrService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "基本销售属性列表")
@RestController
@RequestMapping("admin/product")
public class BaseSaleAttrController {

    @Autowired
    BaseSaleAttrService baseSaleAttrService;

    @ApiOperation("基本销售属性列表")
    @GetMapping("/baseSaleAttrList")
    public Result getBaseSaleAttrList(){

        List<BaseSaleAttr> list =
                baseSaleAttrService.lambdaQuery().list();
        return Result.ok(list);
    }
}
